package top.sjydzq.one.Controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.sjydzq.one.Entity.Category;
import top.sjydzq.one.Mapper.CategoryMapper;

import java.util.List;

@RestController
public class CategoryController {
    @Autowired
    private CategoryMapper categoryMapper;

    @RequestMapping("/category")
    public List<Category> category() {
        return categoryMapper.selectAll();
    }
}
